#include <iostream>
using namespace std;
int main()
{
    //currVal是正在统计的数
    int currVal = 0, val = 0;
    //读取第一个数，确保确实有数据可以处理
    if (cin >> currVal)
    {
        int cnt = 1;
        while (cin >> val)
        {
            if (val == currVal)
                ++cnt;
            else
            {
                cout << currVal << " occurs " << cnt << " times " << endl;
                currVal = val;
                cnt = 1;
            } //end of else
        }     // end of while

        cout << currVal << " occurs " << cnt << " times " << endl; //打印最后一个值的个数
    }                                                              //end of if

    return 0;
}